package com.tool.demo.multiconn.method02;

import com.tool.demo.multiconn.method02.impl.V1ClientImpl;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>多平台调用工具类</p>
 */
public class CommonWorkTaker {

    public static final String PROVINCE_CMP = "CMP";

    private static CommonWorkTaker instance = new CommonWorkTaker();
    private Map<String, IVClient> virtualMachineMap = new HashMap<>();


    public CommonWorkTaker() {
        virtualMachineMap.put(PROVINCE_CMP, new V1ClientImpl());

    }

    public static CommonWorkTaker getInstance() {
        return instance;
    }

    public IVClient getVirtualMachineManager(String platformType) {
        return virtualMachineMap.get(platformType);
    }


}
